package com.xposed.xinhao.hook_momo;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;

import com.xposed.xinhao.utils.LogUtils;

import java.io.BufferedReader;
import java.io.File;

import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;

/**
 * 采源宝V3.5.1
 */
public class MomoHook {

    //保存上下文
    private Context mContext;

    private XC_LoadPackage.LoadPackageParam lpparam;

    public MomoHook(XC_LoadPackage.LoadPackageParam lpparam) {
        this.lpparam = lpparam;
    }

    public void hookMethod() {
        XposedHelpers.findAndHookMethod(Activity.class, "onCreate", Bundle.class, new XC_MethodHook() {
            @Override
            protected void afterHookedMethod(final MethodHookParam param) throws Throwable {
                super.afterHookedMethod(param);
                mContext = (Context) param.thisObject;
                LogUtils.e("Activity onCreate：" + mContext.getClass().getName());
            }
        });

    }
}
